﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MemberManager.aspx.cs" Inherits="Admin_MemberManager" %>

<%@ Register src="AdminMenu.ascx" tagname="AdminMenu" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     <uc1:AdminMenu ID="AdminMenu1" runat="server" />
    <h1>
       成员管理</h1>
    <div>
        <asp:Label ID="lblMessage" runat="server"></asp:Label>
    </div>
    <asp:MultiView ID="Multiview" runat="server" ActiveViewIndex="0">
        <asp:View runat="server" ID="RoleListView">
            <div style="float: right; margin: 5px; clear: both">
                <asp:ImageButton ID="btnAdd" runat="server" SkinID="sknImageAdd" ToolTip="Add User"
                    OnClick="AddNewUserClicked"></asp:ImageButton>
            </div>
            <div class="grid">
                <asp:ListView ID="lvItems" runat="server" OnItemCommand="ItemCommand">
                    <LayoutTemplate>
                        <table id="MemberList" runat="server" class="datatable" cellpadding="0" cellspacing="0">
                            <tr style="font-weight:bold;height:30px;">
                                <th style="font-size:14px">
                                    用户名
                                </th>
                                <th style="font-size:14px">
                                    编辑角色
                                </th>
                                <th  style="font-size:14px">删除
                                </th>
                            </tr>
                            <tr id="itemPlaceholder" runat="server" />
                        </table>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr id="item" runat="server" class="row">
                            <td>
                                <%# Eval("Username")%>
                            </td>
                            <td>
                                <asp:Button ID="btnUserRole" runat="server" Text="编辑角色" CommandName="EditUserRole"
                                    CommandArgument='<%# Eval("UserId")%>' />
                            </td>
                            <td style="text-align: left; white-space: nowrap;">
                                <asp:ImageButton ID="btnDelete" runat="server" SkinID="sknImageDelete" ToolTip="Delete"
                                    CommandName="DeleteItem" CommandArgument='<%# Eval("Username")%>'></asp:ImageButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:ListView>
            </div>
        </asp:View>
        <asp:View runat="server" ID="MemberEditor">
        
            <div class="form">
            <p style="font-weight:bold;font-size:14px;">角色列表:</p>
                <p>
                    <asp:CheckBoxList ID="cblUserRole" runat="server">
                    </asp:CheckBoxList>
                    <asp:HiddenField ID="hfUserName" runat="server" />
                </p>
                <p>
                    <asp:Button ID="btnSubmit" runat="server" Text="<%$Resources:SharedResources, Submit%>"
                        EnableViewState="false" OnClick="SaveClicked" />
                    <asp:Button ID="btnCancel" runat="server" Text="<%$Resources:SharedResources, Cancel%>"
                        EnableViewState="false" OnClick="CancelClicked" />
                </p>
            </div>
        </asp:View>
        <asp:View runat="server" ID="UserEditor">
            <div class="form">
                <table cellspacing="5" cellpadding="1" border="0" align="center" id="gaia_table">
                    <tbody>
                        <tr>
                            <td>
                                <div align="right">
                                    <span><asp:Literal ID="ltlEmail" EnableViewState="false" runat="server" Text="用户名" /> </span>
                                </div>
                            </td>
                            <td>
                                <asp:TextBox ID="UserNameTxt" runat="Server" />
                            </td>
                        </tr>
                        <tr>
                            <td />
                            <td align="left">
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <span><asp:Literal ID="ltlPassword" EnableViewState="false" runat="server" Text="密码" /> </span>
                            </td>
                            <td>
                                <asp:TextBox ID="PasswordTxt" runat="server" TextMode="Password" />
                            </td>
                        </tr>
                    </tbody>
                </table>
                <p>
                    <asp:Button ID="Button2" runat="server" Text="<%$Resources:SharedResources, Submit%>"
                        EnableViewState="false" OnClick="SaveUserClicked" />
                    <asp:Button ID="Button1" runat="server" Text="<%$Resources:SharedResources, Cancel%>"
                        EnableViewState="false" OnClick="CancelUserClicked" />
                    
                </p>
            </div>
        </asp:View>
    </asp:MultiView>
    </form>
</body>
</html>
